import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../views/home/index.vue'
// import Home from '../views/home/demoIndex.vue'
import Home from '../views/home/homeIndex.vue'
import demoIndex from '../views/home/demoIndex.vue'
import shopGread from '../views/home/shopGread.vue'
import conversion from '../views/home/conversion.vue'
import overview from '../views/home/overview.vue'
import retailtime from '../views/home/realtimeMessage.vue'
import distribution from '../views/home/distribution.vue'
import intention from '../views/map/intention.vue'
import map from '../views/map/mapIndex'
import mochaItom from '../views/home/mochaItom.vue'
import operationManagement from '../views/home/operationManagement.vue'
import history from '../views/map/historyData'
import space from '../views/map/spaceMap'
import operate from '../views/map/operateMap'
import kpi from '../views/home/kpi'
import brandValue from '../views/home/brandValue'
import exhibition from '../views/home/exhibition'
import Administration from '../views/home/Administration'
// import demo from '../views/home/demo'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: Home
    },
    {
        path: '/index',
        name: 'index',
        component: index
    },
    {
        path: '/demoIndex',
        name: 'demoIndex',
        component: demoIndex
    },
    {
        path: "/shopGread",
        name: 'shopGread',
        component: shopGread,
    },
    {
        path: "/mochaItom",
        name: 'mochaItom',
        component: mochaItom,
    },
    {
        path: "/operationManagement",
        name: 'operationManagement',
        component: operationManagement,
    },
    {
        path: "/map",
        name: 'map',
        component: map,

    },
    {
        path: "/conversion",
        name: 'conversion',
        component: conversion,
    },
    {
        path: "/overview",
        name: 'overview',
        component: overview,
    },
    {
        path: "/retailtime",
        name: 'retailtime',
        component: retailtime,
    },
    {
        path: "/distribution",
        name: 'distribution',
        component: distribution,
    },
    {
        path: "/intention",
        name: 'intention',
        component: intention,
    },
    {
        path: "/history",
        name: 'history',
        component: history,
    },
    {
        path: '/about',
        name: 'about',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import( /* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: "/space",
        name: 'space',
        component: space,
    },
    {
        path: "/operate",
        name: 'operate',
        component: operate,
        meta: {
            keepAlive: true,
            isBack:true, //用于判断上一个页面是哪个
        },

    },
    {
        path: "/kpi",
        name: 'kpi',
        component: kpi,
    },
    {
        path: "/brandValue",
        name: 'brandValue',
        component: brandValue,
    },
    {
        path: "/exhibition",
        name: 'exhibition',
        component: exhibition,
    },
    {
        path: "/Administration",
        name: 'Administration',
        component: Administration,
    },

]

const router = new VueRouter({
    routes
})

export default router
